package 面向对象中级.练习;

import java.util.Scanner;

public class Student {
    
    public String sno;
    public String name;
    public String sex;
    //注意
    public School school;

    public void printInfo(){
        System.out.println(sno+"=="+name+"=="+sex);
        school.printInfo();//对象名.方法名();
    }
    //alt+insert
    public Student() {
    }

    public Student(String sno, String name, String sex, School school) {
        this.sno = sno;
        this.name = name;
        this.sex = sex;
        this.school = school;
    }

    public Student(String name, String sex) {
        this.name = name;
        this.sex = sex;
    }
}

